<template>
  <div class="type">
      <ul>
        <li v-for="(type,index) in list">
          <router-link :to="{name:'hot', params:{id:index}}">
              <img :src="type.image"><span>{{type.name}}</span><i>&gt;</i>
          </router-link>  
        </li>
      </ul>
  </div> 
</template>

<script>
import axios from 'axios'
export default {
  name: 'type',
  data () {
    return {
     list:[]
      
    }
  },   
  mounted(){
      axios.get('/app/game/newgetclasslist')
      .then((res)=>{
        //console.log(res);
        this.list = res.data.data.classList.concat([{id: "79", image: "http://game.dolapocket.com//img/tab/20160707152230_190.png", name: "其他游戏"}]);
      })
   
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.type,ul{
  width: 100%;
  background: #fff;
}
li{
  height: 0.48rem;
  box-sizing:border-box; 
  width: 100%;
  padding-left: 0.15rem;
}
a{
  display: block;
  width: 100%;
  height: 100%;
  border-bottom: 1px solid #ddd;
}
a img{
  display: inline-block;
  vertical-align: middle;
  height: 0.2rem;
  width: 0.2rem;
  padding-right: 0.15rem;
}
a span{
  display: inline-block;
  vertical-align: middle;
  font-size: 18px;
  line-height: 0.48rem;
}
a i{
  float: right;
  line-height: 0.48rem;
  font-size: 23px;
  font-style: normal;
  margin-right: 0.2rem;
  color: #ddd;
}
</style>
